package com.example.springbootdemo.controller;

import com.example.springbootdemo.sevice.WebserviceService;
import com.example.springbootdemo.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  webservice控制器
 * </p>
 *
 * @author yurenwei
 * @since 2023/9/6
 */
@RestController
@RequestMapping("/api/ws")
public class WebserviceController {

    @Autowired
    private WebserviceService webserviceService;

    /**
     * 发送消息
     *
     * @return
     */
    @PostMapping("/test")
    public Result test(){
        webserviceService.test();
        return Result.ok();
    }
}
